package com.dao;

import com.entity.pojo.Article;
import com.entity.vo.AjaxMassage;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.List;

public interface ArticleMapper {
    boolean deleteByPrimaryKey(String newsId);

    boolean  insert(Article record);

    int  insertSelective(Article record);

    Article selectByPrimaryKey(String newsId);

    boolean  updateByPrimaryKeySelective(Article record);

    boolean  updateByPrimaryKeyWithBLOBs(Article record);

    AjaxMassage update(Article article, MultipartFile multipartFile, HttpServletRequest request, HttpSession session);

    boolean  updateByPrimaryKey(Article record);

    List<Article> getAll(@Param("start") Integer start, @Param("rows") Integer rows,
                         @Param("newsState") Byte newsState,@Param("newsTitle") String newsTitle);

    Article selecOneByTitle(String newsTitle);

    int findArticleTotalCount(@Param("newsTitle") String newsTitle,@Param("newsState") Byte newsState);
}